home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / TSR / TPPOP18C / REMOVE.PAS < prev    next >
Pascal/Delphi Source File  |  1988-11-03  |  806b  |  25 lines

  1. {$A+,B-,D+,E-,F-,I+,L+,N-,O-,R-,S-,V-}
  2. {$M 1024,5120,5120}
  3. Program RemoveTSR;
  4.  
  5. Uses Unhook;
  6.  
  7. Var
  8.   Signature : Byte;
  9.   Result    : Integer;
  10.  
  11. Begin
  12.   Val(ParamStr(1),Signature,Result);   { convert parameter to number }
  13.   WriteLn('Attempting to remove program from program memory.');
  14.   If Installed(Signature)              { is it installed?    }
  15.     Then Begin                         { yes.                }
  16.       If OkToRemove(Signature)         { can it be unloaded? }
  17.         Then Begin
  18.           RemoveProgram(Signature);    { yes. remove it.     }
  19.           WriteLn('Program successfully removed.');
  20.         End
  21.       Else WriteLn('Unable to remove program from memory.');  { unsafe }
  22.     End
  23.   Else WriteLn('Program is not installed.'); { program not found in memory. }
  24. End.
  25.